package com.zhao.controller;

import com.zhao.service.impl.ResponseResult;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @RequestMapping("/hello")
    //@PreAuthorize("hasAuthority('system:test:list')")
    @PreAuthorize("@hasAuthority('system:test:list')")
    public String hello() {
        return "hello";
    }
    @RequestMapping("/testCors")
    public ResponseResult testCors(){
        return new ResponseResult(200,"testCors");
    }
}
